import request from '/@/utils/request';

export function usermanegeApi() {
    return {
        // 表格列表
        getUserList: (params: object) => {
            return request({
                url: '/api/admin/system/users',
                method: 'get',
                params
            });
        },
        // 获取用户详情
        getUserDetail: (params: object) => {
            return request({
                url: '/api/admin/system/user',
                method: 'get',
                params
            });
        },
        // 创建用户
        createUser: (data: object) => {
            return request({
                url: '/api/admin/system/user',
                method: 'post',
                data
            });
        },
        // 编辑用户
        updateUser: (data: object) => {
            return request({
                url: '/api/admin/system/user',
                method: 'put',
                data
            });
        },
        // 删除用户
        deleteUser: (data: object) => {
            return request({
                url: '/api/admin/system/user',
                method: 'delete',
                data
            });
        },

    }
}